<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>LTE-UNB: PhysicalNode/User.h Source File</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />

<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">LTE-UNB
   
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.6.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="headertitle">
<div class="title">PhysicalNode/User.h</div>  </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 
<a name="l00018"></a>00018 <span class="preprocessor">#ifndef _User_h_</span>
<a name="l00019"></a>00019 <span class="preprocessor"></span><span class="preprocessor">#define _User_h_</span>
<a name="l00020"></a>00020 <span class="preprocessor"></span>
<a name="l00021"></a>00021 <span class="preprocessor">#include &quot;<a class="code" href="_physical_node_8h.html">PhysicalNode.h</a>&quot;</span>
<a name="l00022"></a>00022 <span class="preprocessor">#include &quot;<a class="code" href="_receiver_8h.html">Receiver.h</a>&quot;</span>
<a name="l00023"></a>00023 
<a name="l00024"></a>00024 <span class="keyword">using namespace </span>std;
<a name="l00025"></a>00025 
<a name="l00026"></a>00026 <span class="keyword">namespace </span>PhysicalNode
<a name="l00027"></a>00027 {
<a name="l00028"></a>00028 
<a name="l00033"></a><a class="code" href="class_physical_node_1_1_user.html">00033</a> <span class="keyword">class </span><a class="code" href="class_physical_node_1_1_user.html">User</a> : <span class="keyword">public</span> <a class="code" href="class_physical_node_1_1_physical_node.html">PhysicalNode</a>
<a name="l00034"></a>00034 {
<a name="l00035"></a>00035    <span class="keyword">public</span>:
<a name="l00036"></a>00036 
<a name="l00037"></a>00037       
<a name="l00038"></a>00038       
<a name="l00043"></a>00043       <a class="code" href="class_physical_node_1_1_user.html">User</a>();
<a name="l00044"></a>00044       
<a name="l00049"></a>00049       <a class="code" href="class_physical_node_1_1_user.html">User</a>( <a class="code" href="class_basic_1_1_position.html">Basic::Position</a> p, <span class="keywordtype">int</span> site, <span class="keywordtype">int</span> sector, <span class="keywordtype">int</span> <span class="keywordtype">id</span> );
<a name="l00050"></a>00050       
<a name="l00055"></a>00055       <span class="keyword">virtual</span> ~<a class="code" href="class_physical_node_1_1_user.html">User</a>();
<a name="l00056"></a>00056       
<a name="l00061"></a>00061       <span class="keywordtype">void</span> initialize();
<a name="l00062"></a>00062       
<a name="l00068"></a>00068       <span class="keywordtype">void</span> setParameters();
<a name="l00069"></a>00069       
<a name="l00074"></a>00074       <span class="keywordtype">int</span> getENodeBId();
<a name="l00075"></a>00075       
<a name="l00080"></a>00080       <span class="keywordtype">void</span> setENodeBId( <span class="keywordtype">int</span> eNodeBId );
<a name="l00085"></a>00085       <span class="keywordtype">int</span> getENodeBSector();
<a name="l00086"></a>00086       
<a name="l00091"></a>00091       <span class="keywordtype">void</span> setENodeBSector( <span class="keywordtype">int</span> eNodeBSector );
<a name="l00092"></a>00092       
<a name="l00097"></a>00097       <span class="keywordtype">double</span> getGain( <span class="keywordtype">double</span> theta );
<a name="l00098"></a>00098       
<a name="l00102"></a>00102       <span class="keywordtype">void</span> setFrequencies( vec frequencies );
<a name="l00103"></a>00103       
<a name="l00108"></a>00108       <span class="keywordtype">int</span> getNumberFrequencies();
<a name="l00109"></a>00109       
<a name="l00114"></a>00114       <span class="keywordtype">double</span> getFrequency( <span class="keywordtype">int</span> index );
<a name="l00115"></a>00115       
<a name="l00120"></a>00120       <span class="keywordtype">void</span> storeCQI( <span class="keywordtype">double</span> sinr,  
<a name="l00121"></a>00121                      <span class="keywordtype">double</span> frequency,
<a name="l00122"></a>00122                      <span class="keywordtype">int</span> antenna );
<a name="l00123"></a>00123       
<a name="l00128"></a>00128       <span class="keywordtype">void</span> clearCQI();
<a name="l00129"></a>00129       
<a name="l00134"></a>00134       <span class="keywordtype">void</span> clearSINR();
<a name="l00135"></a>00135       
<a name="l00140"></a>00140       <span class="keywordtype">void</span> storeSINR( <span class="keywordtype">double</span> sinr,  
<a name="l00141"></a>00141                       <span class="keywordtype">double</span> frequency,
<a name="l00142"></a>00142                       <span class="keywordtype">int</span> antenna);
<a name="l00143"></a>00143       
<a name="l00148"></a>00148       <span class="keywordtype">double</span> reportCQI( <span class="keywordtype">double</span> frequency,
<a name="l00149"></a>00149                         <span class="keywordtype">int</span> antenna );
<a name="l00150"></a>00150       
<a name="l00155"></a>00155       <span class="keywordtype">double</span> getSINR( <span class="keywordtype">double</span> frequency,
<a name="l00156"></a>00156                       <span class="keywordtype">int</span> antenna );
<a name="l00157"></a>00157       
<a name="l00162"></a>00162       <span class="keywordtype">void</span> updateCQI();
<a name="l00163"></a>00163       
<a name="l00168"></a>00168       <span class="keywordtype">double</span> getAverageSINR( <span class="keywordtype">int</span> antenna );
<a name="l00169"></a>00169       
<a name="l00174"></a>00174       <span class="keywordtype">double</span> getAverageSINR();
<a name="l00175"></a>00175       
<a name="l00180"></a>00180       <span class="keywordtype">double</span> getAverageCQI( <span class="keywordtype">int</span> antenna );
<a name="l00181"></a>00181       
<a name="l00186"></a>00186       <span class="keywordtype">double</span> getAverageCQI();
<a name="l00187"></a>00187       
<a name="l00192"></a>00192       <span class="keywordtype">void</span> adjustCQI( <span class="keywordtype">double</span>&amp; CQI );
<a name="l00193"></a>00193       
<a name="l00197"></a>00197       <span class="keywordtype">double</span> getAverageCQI( vec frequencies, <span class="keywordtype">int</span> antenna );
<a name="l00198"></a>00198       
<a name="l00199"></a>00199       <span class="comment">//bool r;</span>
<a name="l00200"></a>00200       <span class="comment">//int rawBits_;</span>
<a name="l00201"></a>00201       <span class="comment">//int effectiveBits_;</span>
<a name="l00202"></a>00202       <span class="comment">//int eNodeBId_;</span>
<a name="l00203"></a>00203              
<a name="l00204"></a>00204    <span class="keyword">protected</span>:
<a name="l00205"></a>00205       
<a name="l00210"></a><a class="code" href="class_physical_node_1_1_user.html#a5b5b3de0e7f6d9aa22c3cd5dfb665005">00210</a>       <span class="keywordtype">int</span> <a class="code" href="class_physical_node_1_1_user.html#a5b5b3de0e7f6d9aa22c3cd5dfb665005">eNodeBId_</a>;
<a name="l00211"></a>00211       
<a name="l00216"></a><a class="code" href="class_physical_node_1_1_user.html#a723d2dc102e8679b8898fe822aedc9d8">00216</a>       Array&lt; vec &gt; <a class="code" href="class_physical_node_1_1_user.html#a723d2dc102e8679b8898fe822aedc9d8">SINR_</a>;
<a name="l00221"></a><a class="code" href="class_physical_node_1_1_user.html#aebfb204234983709e9f6a0e70ae63189">00221</a>       Array&lt; vec &gt; <a class="code" href="class_physical_node_1_1_user.html#aebfb204234983709e9f6a0e70ae63189">SINR2_</a>;
<a name="l00222"></a>00222       
<a name="l00227"></a><a class="code" href="class_physical_node_1_1_user.html#acdf96a2813156e75fbbd7077a31a25d5">00227</a>       Array&lt; Array&lt; vec &gt; &gt; <a class="code" href="class_physical_node_1_1_user.html#acdf96a2813156e75fbbd7077a31a25d5">CQI_</a>;
<a name="l00228"></a>00228       
<a name="l00233"></a><a class="code" href="class_physical_node_1_1_user.html#aa7c1e226b93ab9839d93705f39a040d6">00233</a>       vec <a class="code" href="class_physical_node_1_1_user.html#aa7c1e226b93ab9839d93705f39a040d6">frequencies_</a>;
<a name="l00234"></a>00234       
<a name="l00238"></a><a class="code" href="class_physical_node_1_1_user.html#abad77877fd054b2e09d0bb642ffefae5">00238</a>       <span class="keywordtype">int</span> <a class="code" href="class_physical_node_1_1_user.html#abad77877fd054b2e09d0bb642ffefae5">CQIUpdatePeriod_</a>;
<a name="l00239"></a>00239       
<a name="l00244"></a><a class="code" href="class_physical_node_1_1_user.html#ae781fe378f30f2199e62e63c5980a737">00244</a>       <span class="keywordtype">int</span> <a class="code" href="class_physical_node_1_1_user.html#ae781fe378f30f2199e62e63c5980a737">CQIUpdateCounter_</a>;
<a name="l00245"></a>00245       
<a name="l00250"></a><a class="code" href="class_physical_node_1_1_user.html#ab795087cde14736f24a42754b208d2cd">00250</a>       <span class="keywordtype">int</span> <a class="code" href="class_physical_node_1_1_user.html#ab795087cde14736f24a42754b208d2cd">numberCQIBits_</a>;
<a name="l00251"></a>00251       
<a name="l00256"></a><a class="code" href="class_physical_node_1_1_user.html#a9222db13c33283c00dc57b51bc24550c">00256</a>       <span class="keywordtype">double</span> <a class="code" href="class_physical_node_1_1_user.html#a9222db13c33283c00dc57b51bc24550c">maxSINRConsidered_</a>;
<a name="l00257"></a>00257       
<a name="l00262"></a><a class="code" href="class_physical_node_1_1_user.html#aaf8b8d17dd021497e7fe9d4a2a9d3ab7">00262</a>       <span class="keywordtype">double</span> <a class="code" href="class_physical_node_1_1_user.html#aaf8b8d17dd021497e7fe9d4a2a9d3ab7">minSINRConsidered_</a>;
<a name="l00263"></a>00263       
<a name="l00268"></a><a class="code" href="class_physical_node_1_1_user.html#a9b7178def11f24e2e3725a1557a41f6b">00268</a>       <span class="keywordtype">double</span> <a class="code" href="class_physical_node_1_1_user.html#a9b7178def11f24e2e3725a1557a41f6b">CQISD_</a>;
<a name="l00269"></a>00269       <span class="keywordtype">int</span> reuse_;
<a name="l00270"></a>00270       <span class="keywordtype">int</span> eNodeBSector_;
<a name="l00271"></a>00271           
<a name="l00272"></a>00272    <span class="keyword">private</span>:
<a name="l00273"></a>00273    
<a name="l00274"></a>00274 };
<a name="l00275"></a>00275 
<a name="l00276"></a>00276 };
<a name="l00277"></a>00277 
<a name="l00278"></a>00278 <span class="keyword">inline</span>
<a name="l00279"></a>00279 <span class="keywordtype">void</span>
<a name="l00280"></a>00280 <a class="code" href="class_physical_node_1_1_user.html#af1d1ecb25afcc86784a182bf5de73f54">PhysicalNode::</a>
<a name="l00281"></a><a class="code" href="class_physical_node_1_1_user.html#af1d1ecb25afcc86784a182bf5de73f54">00281</a> <a class="code" href="class_physical_node_1_1_user.html#af1d1ecb25afcc86784a182bf5de73f54">User::setENodeBId</a>( <span class="keywordtype">int</span> eNodeBId )
<a name="l00282"></a>00282 {
<a name="l00283"></a>00283    eNodeBId_ = eNodeBId;
<a name="l00284"></a>00284 };
<a name="l00285"></a>00285 
<a name="l00286"></a>00286 <span class="comment">//------------------------------------------------------------------------------</span>
<a name="l00287"></a>00287 
<a name="l00288"></a>00288 <span class="keyword">inline</span>
<a name="l00289"></a>00289 <span class="keywordtype">int</span>
<a name="l00290"></a>00290 <a class="code" href="class_physical_node_1_1_user.html#acf91e3ed48a9fad6e22ae63c1f8df1bc">PhysicalNode::</a>
<a name="l00291"></a><a class="code" href="class_physical_node_1_1_user.html#acf91e3ed48a9fad6e22ae63c1f8df1bc">00291</a> <a class="code" href="class_physical_node_1_1_user.html#acf91e3ed48a9fad6e22ae63c1f8df1bc">User::getENodeBId</a>()
<a name="l00292"></a>00292 {
<a name="l00293"></a>00293    <span class="keywordflow">return</span> eNodeBId_;
<a name="l00294"></a>00294 };
<a name="l00295"></a>00295 
<a name="l00296"></a>00296 <span class="comment">//------------------------------------------------------------------------------</span>
<a name="l00297"></a>00297 
<a name="l00298"></a>00298 <span class="keyword">inline</span>
<a name="l00299"></a>00299 <span class="keywordtype">int</span>
<a name="l00300"></a>00300 <a class="code" href="class_physical_node_1_1_user.html#aa1f7945181072916ad0731ef859b7787">PhysicalNode::</a>
<a name="l00301"></a><a class="code" href="class_physical_node_1_1_user.html#aa1f7945181072916ad0731ef859b7787">00301</a> <a class="code" href="class_physical_node_1_1_user.html#aa1f7945181072916ad0731ef859b7787">User::getNumberFrequencies</a>()
<a name="l00302"></a>00302 {
<a name="l00303"></a>00303    <span class="keywordflow">return</span> frequencies_.size();
<a name="l00304"></a>00304 };
<a name="l00305"></a>00305 
<a name="l00306"></a>00306 <span class="comment">// -----------------------------------------------------------------------------</span>
<a name="l00307"></a>00307 
<a name="l00308"></a>00308 <span class="keyword">inline</span>
<a name="l00309"></a>00309 <span class="keywordtype">void</span>
<a name="l00310"></a>00310 <a class="code" href="class_physical_node_1_1_user.html#a295c70eb2dde48b77378635e5a3f95ef">PhysicalNode::</a>
<a name="l00311"></a><a class="code" href="class_physical_node_1_1_user.html#a295c70eb2dde48b77378635e5a3f95ef">00311</a> <a class="code" href="class_physical_node_1_1_user.html#a295c70eb2dde48b77378635e5a3f95ef">User::setENodeBSector</a>( <span class="keywordtype">int</span> eNodeBSector )
<a name="l00312"></a>00312 {
<a name="l00313"></a>00313    eNodeBSector_ = eNodeBSector;
<a name="l00314"></a>00314 };
<a name="l00315"></a>00315 
<a name="l00316"></a>00316 <span class="comment">//------------------------------------------------------------------------------</span>
<a name="l00317"></a>00317 
<a name="l00318"></a>00318 <span class="keyword">inline</span>
<a name="l00319"></a>00319 <span class="keywordtype">int</span>
<a name="l00320"></a>00320 <a class="code" href="class_physical_node_1_1_user.html#ae450b7b1b4e4ebd743fd616179aba68c">PhysicalNode::</a>
<a name="l00321"></a><a class="code" href="class_physical_node_1_1_user.html#ae450b7b1b4e4ebd743fd616179aba68c">00321</a> <a class="code" href="class_physical_node_1_1_user.html#ae450b7b1b4e4ebd743fd616179aba68c">User::getENodeBSector</a>()
<a name="l00322"></a>00322 {
<a name="l00323"></a>00323    <span class="keywordflow">return</span> eNodeBSector_;
<a name="l00324"></a>00324 };
<a name="l00325"></a>00325 
<a name="l00326"></a>00326 
<a name="l00327"></a>00327 
<a name="l00328"></a>00328 
<a name="l00329"></a>00329 
<a name="l00330"></a>00330 <span class="preprocessor">#endif</span>
<a name="l00331"></a>00331 <span class="preprocessor"></span>
</pre></div></div><!-- contents -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Friends</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>



<hr class="footer"/><address class="footer"><small>
Generated on Thu Oct 25 2012 22:25:34 for LTE-UNB by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.6.1
</small></address>

</body>
</html>
